<template>
	<view>
		<view>
			<systemHVue :title='value'>
				<u-icon style="margin-left: 20rpx;" @click="addZhiwei" v-if="value=='职位'" color="#fff" size="22" name="plus"></u-icon>
			</systemHVue>
			<view v-show="value=='职位'">
				<position></position>
			</view>
			<view v-show="value=='招聘跟进'">
				<followUp></followUp>
			</view>
			<view v-show="value=='员工'">
				<staff></staff>
			</view>
			<view v-show="value=='我的'">
				<my></my>
			</view>
		</view>
		<u-tabbar
		  :value="value"
		  @change="name => value = name"
		  :fixed="true"
		  activeColor='#44af85'
		  :placeholder="true"
		  :safeAreaInsetBottom="true"
		>
		  <u-tabbar-item v-for="(item,index) in tabbar[role]" :key="index" :text="item.text" :name='item.name' :icon="item.icon"></u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	import position from '@/components/position/position.vue'
	import followUp from '@/components/followUp/followUp.vue'
	import staff from '@/components/staff/staff.vue'
	import my from '@/components/my/my.vue'
	import systemHVue from '@/components/systemH/systemH.vue'
	export default {
		components:{position,followUp,staff,my,systemHVue},
		data() {
			return {
				value: '职位',
				// onSite：驻场人员  agent：代理商 hire:招聘 staff：人员
				role:'onSite',
				tabbar:{
					'onSite':[
						{text:'职位',icon:'home',name:"职位"},
						{text:'招聘跟进',icon:'photo',name:"招聘跟进"},
						{text:'员工',icon:'play-right',name:"员工"},
						{text:'我的',icon:'account',name:"我的"},
					]
				}
			}
		},
		onLoad() {

		},
		methods: {
			addZhiwei () {
				uni.navigateTo({
					url:"/pages/addZhiWei/addZhiWei"
				})
			}
		}
	}
</script>

<style>
	
</style>
